package com.example.controller.utils;

import lombok.Data;

/**
 * 表现层数据一致性处理
 * 带总页数
 */
@Data
public class R {
    private Boolean flag;
    private Object data;
    private String msg;
    private long total;

    public R() {
    }

    public R(String msg) {
        this.flag = false;
        this.msg = msg;
    }

    public R(Boolean flag, String msg) {
        this.flag = flag;
        this.msg = msg;
    }

    public R(Boolean flag, Object data) {
        this.flag = flag;
        this.data = data;
    }

    public R(Boolean flag, Object data,String msg) {
        this.flag = flag;
        this.data = data;
        this.msg = msg;
    }

    public R(Boolean flag, Object data,String msg, long total) {
        this.flag = flag;
        this.data = data;
        this.msg = msg;
        this.total = total;
    }
}
